import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd

df=pd.read_csv('tips.csv')
print(df.head())
# data
#x：横轴
#y：纵轴
#hue：内部分类
#split：拼接
sns.violinplot(x='smoker',y='tip',data=df,hue='sex',
               split=True)
plt.show()